home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / VideoFolder 1.0a / Source / MoreFiles 1.4.1 / MoreFilesExtras.p < prev    next >
Text File  |  1995-12-21  |  64KB  |  1,613 lines

  1. UNIT MoreFilesExtras;
  2.  
  3. {    Apple Macintosh Developer Technical Support                                }
  4. {                                                                            }
  5. {    A collection of useful high-level File Manager routines.                }
  6. {    by Jim Luther, Apple Developer Technical Support Emeritus                }
  7. {                                                                            }
  8. {    File:        MoreFilesExtras.p                                            }
  9. {                                                                            }
  10. {    Copyright © 1992-1995 Apple Computer, Inc.                                }
  11. {    All rights reserved.                                                    }
  12. {                                                                            }
  13. {    You may incorporate this sample code into your applications without        }
  14. {    restriction, though the sample code has been provided "AS IS" and the    }
  15. {    responsibility for its operation is 100% yours.  However, what you are    }
  16. {    not permitted to do is to redistribute the source as "DSC Sample Code"    }
  17. {    after having made changes. If you're going to re-distribute the source,    }
  18. {    we require that you make it clear in the source that the code was        }
  19. {    descended from Apple Sample Code, but that you've made changes.            }
  20.  
  21.  
  22. INTERFACE
  23.  
  24.     USES
  25.         Files;
  26.  
  27. {    Deny mode permissions for use with the HOpenAware, HOpenRFAware,        }
  28. {    FSpOpenAware, and FSpOpenRFAware functions.                                }
  29.  
  30.     CONST
  31.         dmNone = $0000;
  32.         dmNoneDenyRd = $0010;
  33.         dmNoneDenyWr = $0020;
  34.         dmNoneDenyRdWr = $0030;
  35.         dmRd = $0001;            { Single writer, multiple readers; the readers }
  36.         dmRdDenyRd = $0011;
  37.         dmRdDenyWr = $0021;        { Browsing - equivalent to fsRdPerm }
  38.         dmRdDenyRdWr = $0031;
  39.         dmWr = $0002;
  40.         dmWrDenyRd = $0012;
  41.         dmWrDenyWr = $0022;
  42.         dmWrDenyRdWr = $0032;
  43.         dmRdWr = $0003;            { Shared access - equivalent to fsRdWrShPerm }
  44.         dmRdWrDenyRd = $0013;
  45.         dmRdWrDenyWr = $0023;    { Single writer, multiple readers; the writer }
  46.         dmRdWrDenyRdWr = $0033;    { Exclusive access - equivalent to fsRdWrPerm }
  47.  
  48.  
  49. {    For those times where you need to use more than one kind of                }
  50. {    File Manager parameter block but don't feel like wasting stack space,    }
  51. {    here's a parameter block you can reuse.                                    }
  52.  
  53. {$PUSH}
  54. {$ALIGN MAC68K}
  55.  
  56.     TYPE
  57.         UniversalFMPBHandle = ^UniversalFMPBPtr;
  58.         UniversalFMPBPtr = ^UniversalFMPB;
  59.         UniversalFMPB = RECORD
  60.                 CASE Integer OF
  61.                     1: (
  62.                             PB: ParamBlockRec
  63.                     );
  64.                     2: (
  65.                             ciPB: CInfoPBRec
  66.                     );
  67.                     3: (
  68.                             dtPB: DTPBRec
  69.                     );
  70.                     4: (
  71.                             hPB: HParamBlockRec
  72.                     );
  73.                     5: (
  74.                             cmPB: CMovePBRec
  75.                     );
  76.                     6: (
  77.                             wdPB: WDPBRec
  78.                     );
  79.                     7: (
  80.                             fcbPB: FCBPBRec
  81.                     );
  82.             END;
  83.  
  84.  
  85. {    Used by GetUGEntries to return user or group lists.                        }
  86.  
  87.         UGEntryHandle = ^UGEntryPtr;
  88.         UGEntryPtr = ^UGEntry;
  89.         UGEntry = RECORD
  90.                 objType: Integer;
  91.                 objID: LongInt;
  92.                 name: Str31;
  93.             END;
  94.  
  95.  
  96. {    I use the following record instead of the AFPVolMountInfo structure        }
  97. {    in Files.p                                                                }
  98.  
  99.         Str8 = STRING[8];
  100.         MyAFPVolMountInfoHandle = ^MyAFPVolMountInfoPtr;
  101.         MyAFPVolMountInfoPtr = ^MyAFPVolMountInfo;
  102.         MyAFPVolMountInfo = RECORD
  103.                 length: Integer;                { length of this record }
  104.                 media: VolumeType;                { type of media, always AppleShareMediaType }
  105.                 flags: Integer;                    { 0 = normal mount; set bit 0 to inhibit greeting messages }
  106.                 nbpInterval: SignedByte;        { NBP interval parameter; 7 is a good choice }
  107.                 nbpCount: SignedByte;            { NBP count parameter; 5 is a good choice }
  108.                 uamType: Integer;                { User Authentication Method }
  109.                 zoneNameOffset: Integer;        { offset from start of record to zoneName }
  110.                 serverNameOffset: Integer;        { offset from start of record to serverName }
  111.                 volNameOffset: Integer;            { offset from start of record to volName }
  112.                 userNameOffset: Integer;        { offset from start of record to userName }
  113.                 userPasswordOffset: Integer;    { offset from start of record to userPassword }
  114.                 volPasswordOffset: Integer;        { offset from start of record to volPassword }
  115.                 zoneName: Str31;                { server's AppleTalk zone name }
  116.                 serverName: Str31;                { server name }
  117.                 volName: Str27;                    { volume name }
  118.                 userName: Str31;                { user name (zero length Pascal string for guest) }
  119.                 userPassword: Str8;                { user password (zero length Pascal string if no user password) }
  120.                 volPassword: Str8;                { volume password (zero length Pascal string if no volume password) }
  121.             END;
  122.  
  123. {$ALIGN RESET}
  124. {$POP}
  125.  
  126.  
  127. {***************************************************************************}
  128.  
  129. {    Functions to get information out of GetVolParmsInfoBuffer (implemented    }
  130. {    in this Unit).                                                            }
  131.  
  132.     FUNCTION isNetworkVolume (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  133.     FUNCTION hasLimitFCBs (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  134.     FUNCTION hasLocalWList (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  135.     FUNCTION hasNoMiniFndr (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  136.     FUNCTION hasNoVNEdit (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  137.     FUNCTION hasNoLclSync (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  138.     FUNCTION hasTrshOffLine (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  139.     FUNCTION hasNoSwitchTo (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  140.     FUNCTION hasNoDeskItems (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  141.     FUNCTION hasNoBootBlks (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  142.     FUNCTION hasAccessCntl (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  143.     FUNCTION hasNoSysDir (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  144.     FUNCTION hasExtFSVol (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  145.     FUNCTION hasOpenDeny (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  146.     FUNCTION hasCopyFile (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  147.     FUNCTION hasMoveRename (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  148.     FUNCTION hasDesktopMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  149.     FUNCTION hasShortName (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  150.     FUNCTION hasFolderLock (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  151.     FUNCTION hasPersonalAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  152.     FUNCTION hasUserGroupList (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  153.     FUNCTION hasCatSearch (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  154.     FUNCTION hasFileIDs (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  155.     FUNCTION hasBTreeMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  156.     FUNCTION hasBlankAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  157.  
  158.  
  159. {***************************************************************************}
  160.  
  161.  
  162.     FUNCTION GetTempBuffer (buffReqSize: LONGINT;
  163.                                     VAR buffActSize: LONGINT): Ptr;
  164. {    Allocate a temporary copy or search buffer.}
  165. {{    The GetTempBuffer function allocates a temporary buffer for file system    }
  166. {    operations which is at least 1024 bytes (1K) and a multiple of            }
  167. {    1024 bytes.                                                                }
  168. {                                                                            }
  169. {    buffReqSize        input:    Size you'd like the buffer to be.                }
  170. {    buffActSize        output:    Size of buffer allocated.                        }
  171. {    function result    output:    Pointer to memory allocated or nil if no memory    }
  172. {                            was available. The caller is responsible for    }
  173. {                            disposing of this buffer with DisposePtr.        }
  174.  
  175.  
  176. {***************************************************************************}
  177.  
  178.  
  179.     FUNCTION DetermineVRefNum (pathname: StringPtr;
  180.                                     vRefNum: Integer;
  181.                                     VAR realVRefNum: Integer): OSErr;
  182. {    Use DetermineVRefNum to determine the volume reference number of a        }
  183. {    volume from a pathname, a volume specification, or a combination        }
  184. {    of the two.                                                                }
  185. {    WARNING: Volume names on the Macintosh are *not* unique -- Multiple        }
  186. {    mounted volumes can have the same name. For this reason, the use of a    }
  187. {    volume name or full pathname to identify a specific volume may not        }
  188. {    produce the results you expect.  If more than one volume has the same    }
  189. {    name and a volume name or full pathname is used, the File Manager        }
  190. {    currently uses the first volume it finds with a matching name in the    }
  191. {    volume queue.                                                            }
  192. {                                                                            }
  193. {    pathName    input:    Pointer to a full pathname or nil.  If you pass in    }
  194. {                        a partial pathname, it is ignored. A full pathname    }
  195. {                        to a volume must end with a colon character (:).    }
  196. {    vRefNum        input:    Volume specification (volume reference number,        }
  197. {                        working    directory number, drive number, or 0).        }
  198. {    realVRefNum    output:    The real volume reference number.                    }
  199.  
  200.  
  201. {***************************************************************************}
  202.  
  203.  
  204.     FUNCTION HGetVInfo (volReference: Integer;
  205.                                     volName: StringPtr;
  206.                                     VAR vRefNum: Integer;
  207.                                     VAR freeBytes: LongInt;
  208.                                     VAR totalBytes: LongInt): OSErr;
  209. {    The HGetVInfo function returns the name, volume reference number,        }
  210. {    available space (in bytes), and total space (in bytes) for the            }
  211. {    specified volume. You can specify the volume by providing its drive        }
  212. {    number, volume reference number, or 0 for the default volume.            }
  213. {    This routine is compatible with volumes up to 4 gigabytes.                }
  214. {                                                                            }
  215. {    volReference    input:    The drive number, volume reference number,        }
  216. {                            or 0 for the default volume.                    }
  217. {    volName            input:    A pointer to a buffer (minimum Str27) where        }
  218. {                            the volume name is to be returned or must        }
  219. {                            be nil.                                            }
  220. {                    output:    The volume name.                                }
  221. {    vRefNum            output:    The volume reference number.                    }
  222. {    freeBytes        output:    The number of free bytes on the volume.            }
  223. {                            freeBytes is an UNSIGNED long value.            }
  224. {    totalBytes        output:    The total number of bytes on the volume.        }
  225. {                            totalBytes is an UNSIGNED long value.            }
  226.  
  227.  
  228. {***************************************************************************}
  229.  
  230.  
  231.     FUNCTION XGetVInfo (volReference: Integer;
  232.                                     volName: StringPtr;
  233.                                     VAR vRefNum: Integer;
  234.                                     VAR freeBytes: UnsignedWide;
  235.                                     VAR totalBytes: UnsignedWide): OSErr;
  236. {    The XGetVInfo function returns the name, volume reference number,        }
  237. {    available space (in bytes), and total space (in bytes) for the            }
  238. {    specified volume. You can specify the volume by providing its drive        }
  239. {    number, volume reference number, or 0 for the default volume.            }
  240. {    This routine is compatible with volumes up to 2 terabytes.                }
  241. {                                                                            }
  242. {    volReference    input:    The drive number, volume reference number,        }
  243. {                            or 0 for the default volume.                    }
  244. {    volName            input:    A pointer to a buffer (minimum Str27) where        }
  245. {                            the volume name is to be returned or must        }
  246. {                            be nil.                                            }
  247. {                    output:    The volume name.                                }
  248. {    vRefNum            output:    The volume reference number.                    }
  249. {    freeBytes        output:    The number of free bytes on the volume.            }
  250. {                            freeBytes is an UnsignedWide value.                }
  251. {    totalBytes        output:    The total number of bytes on the volume.        }
  252. {                            totalBytes is an UnsignedWide value.            }
  253.  
  254.  
  255. {***************************************************************************}
  256.  
  257.  
  258.     FUNCTION CheckVolLock (pathname: StringPtr;
  259.                                     vRefNum: Integer): OSErr;
  260. {    Use CheckVolLock to determine if a volume is locked - either by         }
  261. {    hardware or by software. If CheckVolLock returns noErr, then the volume    }
  262. {    is not locked.                                                            }
  263. {                                                                            }
  264. {    pathName    input:    Pointer to a full pathname or nil.  If you pass in    }
  265. {                        a partial pathname, it is ignored. A full pathname    }
  266. {                        to a volume must end with a colon character (:).    }
  267. {    vRefNum        input:    Volume specification (volume reference number,        }
  268. {                        working    directory number, drive number, or 0).        }
  269.  
  270.  
  271. {***************************************************************************}
  272.  
  273.  
  274.     FUNCTION GetDriverName (driverRefNum: Integer;
  275.                                     VAR driverName: Str255): OSErr;
  276. {    Get a device driver's name.                                                }
  277. {    The GetDriverName function returns a device driver's name.                }
  278. {                                                                            }
  279. {    driverRefNum    input:    The driver reference number.                    }
  280. {    driverName        output:    The driver's name.                                }
  281.  
  282.  
  283. {***************************************************************************}
  284.  
  285.  
  286.     FUNCTION FindDrive (pathname: StringPtr;
  287.                                     vRefNum: Integer;
  288.                                     VAR driveQElementPtr: DrvQElPtr): OSErr;
  289. {    Find a volume's drive queue element in the drive queue.                    }
  290. {    The FindDrive function returns a pointer to a mounted volume's            }
  291. {    drive queue element.                                                    }
  292. {                                                                            }
  293. {    pathName            input:    Pointer to a full pathname or nil. If you    }
  294. {                                pass in a partial pathname, it is ignored.    }
  295. {                                A full pathname to a volume must end with    }
  296. {                                a colon character (:).                        }
  297. {    vRefNum                input:    Volume specification (volume reference        }
  298. {                                number, working directory number, drive        }
  299. {                                number, or 0).                                }
  300. {    driveQElementPtr    output:    Pointer to a volume's drive queue element    }
  301. {                                in the drive queue. DO NOT change the        }
  302. {                                DrvQEl.                                        }
  303.  
  304.  
  305. {***************************************************************************}
  306.  
  307.  
  308.     FUNCTION UnmountAndEject (pathname: StringPtr;
  309.                                     vRefNum: Integer): OSErr;
  310. {    Use UnmountAndEject to unmount and eject a volume. The volume is        }
  311. {    ejected only if it's ejectable and not already ejected.                    }
  312. {                                                                            }
  313. {    pathName    input:    Pointer to a full pathname or nil.  If you pass in  }
  314. {                        a partial pathname, it is ignored. A full pathname    }
  315. {                        to a volume must end with a colon character (:).    }
  316. {    vRefNum        input:    Volume specification (volume reference number,        }
  317. {                        workingdirectory number, drive number, or 0).        }
  318.  
  319.  
  320. {***************************************************************************}
  321.  
  322.  
  323.     FUNCTION OnLine (volumes: FSSpecPtr;
  324.                                     reqVolCount: Integer;
  325.                                     VAR actVolCount: Integer;
  326.                                     VAR volIndex: Integer): OSErr;
  327. {    Use OnLine to return the list of volumes currently mounted.                }
  328. {                                                                            }
  329. {    volumes        input:    Pointer to array of FSSpec where the volume list    }
  330. {                        is returned.                                        }
  331. {    reqVolCount    input:    Maximum number of volumes to return    (the number of    }
  332. {                        elements in the volumes array).                        }
  333. {    actVolCount    output: The number of volumes actually returned.            }
  334. {    volIndex    input:    The current volume index position. Set to 1 to        }
  335. {                        start with the first volume.                        }
  336. {                output:    The volume index position to get the next volume.    }
  337. {                        Pass this value the next time you call OnLine to    }
  338. {                        start where you left off.                            }
  339.  
  340.  
  341. {***************************************************************************}
  342.  
  343.  
  344.     FUNCTION SetDefault (newVRefNum: Integer;
  345.                                     newDirID: LongInt;
  346.                                     VAR oldVRefNum: Integer;
  347.                                     VAR oldDirID: LongInt): OSErr;
  348. {    Set the default volume before making Standard I/O requests.                }
  349. {    The SetDefault function sets the default volume and directory to the    }
  350. {    volume specified by newVRefNum and the directory specified by newDirID.    }
  351. {    The current default volume reference number and directory ID are        }
  352. {    returned in oldVRefNum and oldDir and must be used to restore the        }
  353. {    default volume and directory to their previous state *as soon as        }
  354. {    possible* with the RestoreDefault function. These two functions are        }
  355. {    designed to be used as a wrapper around Standard I/O routines where        }
  356. {    the location of the file is implied to be the default volume and        }
  357. {    directory. In other words, this is how you should use these functions:    }
  358. {                                                                            }
  359. {        error := SetDefault(newVRefNum, newDirID, oldVRefNum, oldDirID);    }
  360. {        IF ( error = noErr ) THEN                                            }
  361. {        BEGIN                                                                }
  362. {            -- call the Standard I/O requests like Open, Reset and    --        }
  363. {            -- Rewrite here!                                        --        }
  364. {                                                                            }
  365. {            error := RestoreDefault(oldVRefNum, oldDirID);                    }
  366. {        END;                                                                }
  367. {                                                                            }
  368. {    By using these functions as a wrapper, you won't need to open a working    }
  369. {    directory (because SetDefault and RestoreDefault use HSetVol) and you    }
  370. {    won't have to worry about the effects of using HSetVol (documented in    }
  371. {    Technical Note "FL 11 - PBHSetVol is Dangerous" and in the                }
  372. {    Inside Macintosh: Files book in the description of the HSetVol and        }
  373. {    PBHSetVol functions) because the default volume/directory is restored    }
  374. {    before giving up control to code that might be affected by HSetVol.        }
  375. {                                                                            }
  376. {    newVRefNum    input:    Volume specification (volume reference number,        }
  377. {                        working directory number, drive number, or 0) of    }
  378. {                        the new default volume.                                }
  379. {    newDirID    input:    Directory ID of the new default directory.            }
  380. {    oldVRefNum    output: The volume specification to save for use with        }
  381. {                        RestoreDefault.                                        }
  382. {    oldDirID    output:    The directory ID to save for use with                }
  383. {                        RestoreDefault.                                        }
  384.  
  385.  
  386. {***************************************************************************}
  387.  
  388.  
  389.     FUNCTION RestoreDefault (oldVRefNum: Integer;
  390.                                     oldDirID: LongInt): OSErr;
  391. {    Restore the default volume after making Standard I/O requests.            }
  392. {    The RestoreDefault function restores the default volume and directory    }
  393. {    to the volume specified by oldVRefNum and the directory specified by    }
  394. {    oldDirID. The oldVRefNum and oldDirID parameters were previously        }
  395. {    obtained from the SetDefault function. These two functions are designed    }
  396. {    to be used as a wrapper around Standard I/O routines where the            }
  397. {    location of the file is implied to be the default volume and directory.    }
  398. {    In other words, this is how you should use these functions:                }
  399. {                                                                            }
  400. {        error := SetDefault(newVRefNum, newDirID, oldVRefNum, oldDirID);    }
  401. {        IF ( error = noErr ) THEN                                            }
  402. {        BEGIN                                                                }
  403. {            -- call the Standard I/O requests like Open, Reset and    --        }
  404. {            -- Rewrite here!                                        --        }
  405. {                                                                            }
  406. {            error := RestoreDefault(oldVRefNum, oldDirID);                    }
  407. {        END;                                                                }
  408. {                                                                            }
  409. {    By using these functions as a wrapper, you won't need to open a working    }
  410. {    directory (because SetDefault and RestoreDefault use HSetVol) and you    }
  411. {    won't have to worry about the effects of using HSetVol (documented in    }
  412. {    Technical Note "FL 11 - PBHSetVol is Dangerous" and in the                }
  413. {    Inside Macintosh: Files book in the description of the HSetVol and        }
  414. {    PBHSetVol functions) because the default volume/directory is restored    }
  415. {    before giving up control to code that might be affected by HSetVol.        }
  416. {                                                                            }
  417. {    oldVRefNum    input: The volume specification to restore.                    }
  418. {    oldDirID    input:    The directory ID to restore.                        }
  419.  
  420.  
  421. {***************************************************************************}
  422.  
  423.  
  424.     FUNCTION GetDInfo (vRefNum: Integer;
  425.                                     dirID: LongInt;
  426.                                     name: StringPtr;
  427.                                     VAR fndrInfo: DInfo): OSErr;
  428. {    Use GetDInfo to get the finder information for a directory.                }
  429. {                                                                            }
  430. {    vRefNum            input:    Volume specification.                            }
  431. {    dirID            input:    Directory ID.                                    }
  432. {    name            input:    Pointer to object name, or nil when dirID        }
  433. {                            specifies a directory that's the object.        }
  434. {    fndrInfo        output:    If the object is a directory, then its DInfo.    }
  435.  
  436.  
  437. {***************************************************************************}
  438.  
  439.  
  440.     FUNCTION FSpGetDInfo ({CONST}
  441.                                     VAR spec: FSSpec;
  442.                                     VAR fndrInfo: DInfo): OSErr;
  443. {    Use FSpGetDInfo to get the finder information for a directory.            }
  444. {                                                                            }
  445. {    spec        input:    An FSSpec record specifying the directory.            }
  446. {    fndrInfo    output:    If the object is a directory, then its DInfo.        }
  447.  
  448.  
  449. {***************************************************************************}
  450.  
  451.  
  452.     FUNCTION SetDInfo (vRefNum: Integer;
  453.                                     dirID: LongInt;
  454.                                     name: StringPtr;
  455.                                     fndrInfo: DInfo): OSErr;
  456. {    Use SetDInfo to Set the finder information for a directory.                }
  457. {                                                                            }
  458. {    vRefNum            input:    Volume specification.                            }
  459. {    dirID            input:    Directory ID.                                    }
  460. {    name            input:    Pointer to object name, or nil when dirID        }
  461. {                            specifies a directory that's the object.        }
  462. {    fndrInfo        output:    The DInfo.                                        }
  463.  
  464.  
  465. {***************************************************************************}
  466.  
  467.  
  468.     FUNCTION FSpSetDInfo ({CONST}
  469.                                     VAR spec: FSSpec;
  470.                                     fndrInfo: DInfo): OSErr;
  471. {    Use FSpSetDInfo to set the finder information for a directory.            }
  472. {                                                                            }
  473. {    spec        input:    An FSSpec record specifying the directory.            }
  474. {    fndrInfo    input:    The DInfo.                                            }
  475.  
  476.  
  477. {***************************************************************************}
  478.  
  479.  
  480.     FUNCTION GetDirectoryID (vRefNum: Integer;
  481.                                     dirID: LongInt;
  482.                                     name: StringPtr;
  483.                                     VAR theDirID: LongInt;
  484.                                     VAR isDirectory: Boolean): OSErr;
  485. {    Use GetDirectoryID to get the directory ID number of the directory        }
  486. {    specified.  If a file is specified, then the parent                        }
  487. {    directory of the file is returned and isDirectory is false.  If            }
  488. {    a directory is specified, then that directory's ID number is            }
  489. {    returned and isDirectory is true.                                        }
  490. {    WARNING: Volume names on the Macintosh are *not* unique -- Multiple        }
  491. {    mounted volumes can have the same name. For this reason, the use of a    }
  492. {    volume name or full pathname to identify a specific volume may not        }
  493. {    produce the results you expect.  If more than one volume has the same    }
  494. {    name and a volume name or full pathname is used, the File Manager        }
  495. {    currently uses the first volume it finds with a matching name in the    }
  496. {    volume queue.                                                            }
  497. {                                                                            }
  498. {    vRefNum            input:    Volume specification.                            }
  499. {    dirID            input:    Directory ID.                                    }
  500. {    name            input:    Pointer to object name, or nil when dirID        }
  501. {                            specifies a directory that's the object.        }
  502. {    theDirID        output:    If the object is a file, then its parent        }
  503. {                            directory ID. If the object is a directory,        }
  504. {                            then its ID.                                    }
  505. {    isDirectory        output:    True if object is a directory; false if            }
  506. {                            object is a file.                                }
  507.  
  508.  
  509. {***************************************************************************}
  510.  
  511.  
  512.     FUNCTION FSpGetDirectoryID ({CONST}
  513.                                     VAR spec: FSSpec;
  514.                                     VAR theDirID: LongInt;
  515.                                     VAR isDirectory: Boolean): OSErr;
  516. {    Use DirIDFromFSSpec to get the directory ID number of the directory        }
  517. {    specified by spec. If spec is to a file, then the parent                }
  518. {    directory of the file is returned and isDirectory is false.  If            }
  519. {    spec is to a directory, then that directory's ID number is                }
  520. {    returned and isDirectory is true.                                        }
  521. {                                                                            }
  522. {    spec            input:    An FSSpec record specifying the directory.        }
  523. {    theDirID        output:    The directory ID.                                }
  524. {    isDirectory        output:    True if object is a directory; false if            }
  525. {                            object is a file.                                }
  526.  
  527.  
  528. {***************************************************************************}
  529.  
  530.  
  531.     FUNCTION GetDirName (vRefNum: Integer;
  532.                                     dirID: LongInt;
  533.                                     name: StringPtr): OSErr;
  534. {    Use GetDirName to get the name of a directory from its directory ID.    }
  535. {                                                                            }
  536. {    vRefNum        input:    Volume specification.                                }
  537. {    dirID        input:    Directory ID.                                        }
  538. {    name        output:    Points to a buffer (minimum Str63) where the        }
  539. {                        directory name is to be returned or must be nil.    }
  540.  
  541.  
  542. {***************************************************************************}
  543.  
  544.  
  545.     FUNCTION GetParentID (vRefNum: Integer;
  546.                                     dirID: LongInt;
  547.                                     name: StringPtr;
  548.                                     VAR parID: LongInt): OSErr;
  549. {    Use GetParentID to get the parent directory ID number of the specified    }
  550. {    object.                                                                    }
  551. {                                                                            }
  552. {    vRefNum        input:    Volume specification.                                }
  553. {    dirID        input:    Directory ID.                                        }
  554. {    name        input:    Pointer to object name, or nil when dirID specifies    }
  555. {                        a directory that's the object.                        }
  556. {    parID        output:    The parent directory ID of the specified object.    }
  557.  
  558.  
  559. {***************************************************************************}
  560.  
  561.  
  562.     FUNCTION GetFilenameFromPathname (pathname: Str255;
  563.                                     VAR filename: Str255): OSErr;
  564. {    Use GetFilenameFromPathname to get the file (or directory) name from    }
  565. {    the end of a full or partial pathname. Returns notAFileErr if the        }
  566. {    pathname is nil, the pathname is empty, or the pathname cannot refer to    }
  567. {    a filename (with a noErr result, the pathname could still refer to a    }
  568. {    directory). GetFilenameFromPathname is used by GetObjectLocation.        }
  569. {                                                                            }
  570. {    pathname    input:    A full or partial pathname.                            }
  571. {    filename    output:    The file (or directory) name.                        }
  572.  
  573.  
  574. {***************************************************************************}
  575.  
  576.  
  577.     FUNCTION GetObjectLocation (vRefNum: Integer;
  578.                                     dirID: LongInt;
  579.                                     pathname: StringPtr;
  580.                                     VAR realVRefNum: Integer;
  581.                                     VAR realParID: LongInt;
  582.                                     VAR realName: Str255;
  583.                                     VAR isDirectory: Boolean): OSErr;
  584. {    Use GetObjectLocation to get a file system object's location - that is,    }
  585. {    its real volume reference number, real parent directory ID, and name.    }
  586. {    While we're at it, determine if the object is a file or directory.        }
  587. {    If GetObjectLocation returns fnfErr, then the location information        }
  588. {    returned is valid, but it describes an object that doesn't exist.        }
  589. {    You can use the location information for another operation, such as        }
  590. {    creating a file or directory.                                            }
  591. {                                                                            }
  592. {    vRefNum        input:    Volume specification.                                }
  593. {    dirID        input:    Directory ID.                                        }
  594. {    pathname    input:    Pointer to object name, or nil when dirID specifies    }
  595. {                        a directory that's the object.                        }
  596. {    realVRefNum    output:    The real volume reference number.                    }
  597. {    realParID    output:    The parent directory ID of the specified object.    }
  598. {    realName    output:    The name of the specified object (the case of the    }
  599. {                        object name may not be the same as the object's        }
  600. {                        catalog entry on disk - since the Macintosh file    }
  601. {                        system is not case sensitive, it shouldn't matter).    }
  602. {    isDirectory    output:    True if object is a directory; false if object        }
  603. {                        is a file.                                            }
  604.  
  605.  
  606. {***************************************************************************}
  607.  
  608.  
  609.     FUNCTION GetDirItems (vRefNum: Integer;
  610.                                     dirID: LongInt;
  611.                                     name: StringPtr;
  612.                                     getFiles: Boolean;
  613.                                     getDirectories: Boolean;
  614.                                     items: FSSpecPtr;
  615.                                     reqItemCount: Integer;
  616.                                     VAR actItemCount: Integer;
  617.                                     VAR itemIndex: Integer): OSErr;
  618. {    Use GetDirItems to return a list of items in a directory.                }
  619. {                                                                            }
  620. {    vRefNum            input:    Volume specification.                            }
  621. {    dirID            input:    Directory ID.                                    }
  622. {    name            input:    Pointer to object name, or nil when dirID        }
  623. {                            specifies a directory that's the object.        }
  624. {    getFiles        input:    Pass true to have files added to the items list.}
  625. {    getDirectories    input:    Pass true to have directories added to the        }
  626. {                            items list.                                        }
  627. {    items            input:    Pointer to array of FSSpec where the item list    }
  628. {                            is returned.                                    }
  629. {    reqItemCount    input:    Maximum number of items to return (the number    }
  630. {                            of elements in the items array).                }
  631. {    actItemCount    output: The number of volumes actually returned.        }
  632. {    itemIndex        input:    The current item index position. Set to 1 to    }
  633. {                            start with the first item in the directory.        }
  634. {                    output:    The item index position to get the next item.    }
  635. {                            Pass this value the next time you call            }
  636. {                            GetDirItems to start where you left off.        }
  637.  
  638.  
  639. {***************************************************************************}
  640.  
  641.  
  642.     FUNCTION DeleteDirectoryContents (vRefNum: Integer;
  643.                                     dirID: LongInt;
  644.                                     name: StringPtr): OSErr;
  645. {    The DeleteDirectoryContents function deletes the contents of a            }
  646. {    directory. All files and subdirectories in the specified directory are    }
  647. {    deleted. If a locked file or directory is encountered, it is unlocked    }
  648. {    and then deleted.  If any unexpected errors are encountered,            }
  649. {    DeleteDirectoryContents quits and returns to the caller.                }
  650. {                                                                            }
  651. {    vRefNum    input:    Volume specification.                                    }
  652. {    dirID    input:    Directory ID.                                            }
  653. {    name    input:    Pointer to directory name, or nil when dirID specifies    }
  654. {                    a directory that's the object.                            }
  655.  
  656.  
  657. {***************************************************************************}
  658.  
  659.  
  660.     FUNCTION DeleteDirectory (vRefNum: Integer;
  661.                                     dirID: LongInt;
  662.                                     name: StringPtr): OSErr;
  663. {    The DeleteDirectory function deletes a directory and its contents.        }
  664. {    All files and subdirectories in the specified directory are deleted.    }
  665. {    If a locked file or directory is encountered, it is unlocked and then    }
  666. {    deleted.  After deleting the directories contents, the directory is        }
  667. {    deleted. If any unexpected errors are encountered, DeleteDirectory        }
  668. {    quits and returns to the caller.                                        }
  669. {                                                                            }
  670. {    vRefNum    input:    Volume specification.                                    }
  671. {    dirID    input:    Directory ID.                                            }
  672. {    name    input:    Pointer to directory name, or nil when dirID specifies    }
  673. {                    a directory that's the object.                            }
  674.  
  675.  
  676. {***************************************************************************}
  677.  
  678.  
  679.     FUNCTION CheckObjectLock (vRefNum: Integer;
  680.                                     dirID: LongInt;
  681.                                     name: StringPtr): OSErr;
  682. {    Use CheckObjectLock to determine if a file or directory is locked.        }
  683. {    If CheckObjectLock returns noErr, then the file or directory            }
  684. {    is not locked.                                                            }
  685. {                                                                            }
  686. {    vRefNum    input:    Volume specification.                                    }
  687. {    dirID    input:    Directory ID.                                            }
  688. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  689. {                    a directory that's the object.                            }
  690.  
  691.  
  692. {***************************************************************************}
  693.  
  694.     FUNCTION FSpCheckObjectLock ({CONST}
  695.                                     VAR spec: FSSpec): OSErr;
  696. {    Use FSpCheckObjectLock to determine if a file or directory is locked.    }
  697. {    If FSpCheckObjectLock returns noErr, then the file or directory            }
  698. {    is not locked.                                                            }
  699. {                                                                            }
  700. {    spec    input:    An FSSpec record specifying the object.                    }
  701.  
  702.  
  703. {***************************************************************************}
  704.  
  705.  
  706.     FUNCTION GetFileSize (vRefNum: Integer;
  707.                                     dirID: LongInt;
  708.                                     fileName: Str255;
  709.                                     VAR dataSize: LONGINT;
  710.                                     VAR rsrcSize: LONGINT): OSErr;
  711. {    Get the logical sizes of a file's forks.                                }
  712. {    The GetFileSize function returns the logical size of a file's            }
  713. {    data and resource fork.                                                    }
  714. {                                                                            }
  715. {    vRefNum        input:    Volume specification.                                }
  716. {    dirID        input:    Directory ID.                                        }
  717. {    name        input:    The name of the file.                                }
  718. {    dataSize    output:    The number of bytes in the file's data fork.        }
  719. {    rsrcSize    output:    The number of bytes in the file's resource fork.    }
  720.  
  721.  
  722. {***************************************************************************}
  723.  
  724.  
  725.     FUNCTION FSpGetFileSize ({CONST}
  726.                                     VAR spec: FSSpec;
  727.                                     VAR dataSize: LONGINT;
  728.                                     VAR rsrcSize: LONGINT): OSErr;
  729. {    Get the logical sizes of a file's forks.                                }
  730. {    The FSpGetFileSize function returns the logical size of a file's        }
  731. {    data and resource fork.                                                    }
  732. {                                                                            }
  733. {    spec        input:    An FSSpec record specifying the file.                }
  734. {    dataSize    output:    The number of bytes in the file's data fork.        }
  735. {    rsrcSize    output:    The number of bytes in the file's resource fork.    }
  736.  
  737.  
  738. {***************************************************************************}
  739.  
  740.  
  741.     FUNCTION BumpDate (vRefNum: Integer;
  742.                                     dirID: LongInt;
  743.                                     name: StringPtr): OSErr;
  744. {    Use BumpDate to change the modification date of a file or directory to    }
  745. {    the current date/time.  If the modification date is already equal to    }
  746. {    the current date/time, then add one second to the modification date.    }
  747. {                                                                            }
  748. {    vRefNum    input:    Volume specification.                                    }
  749. {    dirID    input:    Directory ID.                                            }
  750. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  751. {                    a directory that's the object.                            }
  752.  
  753.  
  754. {***************************************************************************}
  755.  
  756.     FUNCTION FSpBumpDate ({CONST}
  757.                                     VAR spec: FSSpec): OSErr;
  758. {    Use FSpBumpDate to change the modification date of a file or directory    }
  759. {    to the current date/time.  If the modification date is already equal    }
  760. {    to the current date/time, then add one second to the modification date.    }
  761. {                                                                            }
  762. {    spec    input:    An FSSpec record specifying the object.                    }
  763.  
  764.  
  765. {***************************************************************************}
  766.  
  767.  
  768.     FUNCTION ChangeCreatorType (vRefNum: Integer;
  769.                                     dirID: LongInt;
  770.                                     name: Str255;
  771.                                     creator: OSType;
  772.                                     fileType: OSType): OSErr;
  773. {    Use ChangeCreatorType to change the creator or file type of a file.        }
  774. {                                                                            }
  775. {    vRefNum        input:    Volume specification.                                }
  776. {    dirID        input:    Directory ID.                                        }
  777. {    name        input:    The name of the file.                                }
  778. {    creator        input:    The new creator type or 0x00000000 to leave            }
  779. {                        the creator type alone.                                }
  780. {    fileType    input:    The new file type or 0x00000000 to leave the        }
  781. {                        file type alone.                                    }
  782.  
  783.  
  784. {***************************************************************************}
  785.  
  786.  
  787.     FUNCTION FSpChangeCreatorType ({CONST}
  788.                                     VAR spec: FSSpec;
  789.                                     creator: OSType;
  790.                                     fileType: OSType): OSErr;
  791. {    Use FSpChangeCreatorType to change the creator or file type of a file.    }
  792. {                                                                            }
  793. {    spec        input:    An FSSpec record specifying the file.                }
  794. {    creator        input:    The new creator type or 0x00000000 to leave            }
  795. {                        the creator type alone.                                }
  796. {    fileType    input:    The new file type or 0x00000000 to leave the        }
  797. {                        file type alone.                                    }
  798.  
  799.  
  800. {***************************************************************************}
  801.  
  802.  
  803.     FUNCTION ChangeFDFlags (vRefNum: Integer;
  804.                                     dirID: LongInt;
  805.                                     name: StringPtr;
  806.                                     setBits: Boolean;
  807.                                     flagBits: Integer): OSErr;
  808. {    Use ChangeFDFlags to set or clear Finder Flag bits in the fdFlags field    }
  809. {    of a file or directory's FInfo record.                                    }
  810. {                                                                            }
  811. {    vRefNum        input:    Volume specification.                                }
  812. {    dirID        input:    Directory ID.                                        }
  813. {    name        input:    Pointer to object name, or nil when dirID specifies    }
  814. {                        a directory that's the object.                        }
  815. {    setBits        input:    If true, then set the bits specified in flagBits.    }
  816. {                        If false, then clear the bits specified in flagBits.}
  817. {    flagBits    input:    The flagBits parameter specifies which Finder Flag    }
  818. {                        bits to set or clear. If a bit in flagBits is set,    }
  819. {                        then the same bit in fdFlags is either set or        }
  820. {                        cleared depending on the state of the setBits        }
  821. {                        parameter.                                            }
  822.  
  823.  
  824. {***************************************************************************}
  825.  
  826.  
  827.     FUNCTION FSpChangeFDFlags ({CONST}
  828.                                     VAR spec: FSSpec;
  829.                                     setBits: Boolean;
  830.                                     flagBits: Integer): OSErr;
  831. {    Use FSpChangeFDFlags to set or clear Finder Flag bits in the fdFlags    }
  832. {    field of a file or directory's FInfo record.                            }
  833. {                                                                            }
  834. {    spec        input:    An FSSpec record specifying the object.                }
  835. {    setBits        input:    If true, then set the bits specified in flagBits.    }
  836. {                        If false, then clear the bits specified in flagBits.}
  837. {    flagBits    input:    The flagBits parameter specifies which Finder Flag    }
  838. {                        bits to set or clear. If a bit in flagBits is set,    }
  839. {                        then the same bit in fdFlags is either set or        }
  840. {                        cleared depending on the state of the setBits        }
  841. {                        parameter.                                            }
  842.  
  843.  
  844. {***************************************************************************}
  845.  
  846.  
  847.     FUNCTION SetIsInvisible (vRefNum: Integer;
  848.                                     dirID: LongInt;
  849.                                     name: StringPtr): OSErr;
  850. {    Use SetIsInvisible to set the invisible bit in the fdFlags word of the    }
  851. {    specified file or directory's finder information.                        }
  852. {                                                                            }
  853. {    vRefNum    input:    Volume specification.                                    }
  854. {    dirID    input:    Directory ID.                                            }
  855. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  856. {                    a directory that's the object.                            }
  857.  
  858.  
  859. {***************************************************************************}
  860.  
  861.  
  862.     FUNCTION FSpSetIsInvisible ({CONST}
  863.                                     VAR spec: FSSpec): OSErr;
  864. {    Use FSpSetIsInvisible to set the invisible bit in the fdFlags word of    }
  865. {    the specified file or directory's finder information.                    }
  866. {                                                                            }
  867. {    spec    input:    An FSSpec record specifying the object.                    }
  868.  
  869.  
  870. {***************************************************************************}
  871.  
  872.  
  873.     FUNCTION ClearIsInvisible (vRefNum: Integer;
  874.                                     dirID: LongInt;
  875.                                     name: StringPtr): OSErr;
  876. {    Use ClearIsInvisible to clear the invisible bit in the fdFlags word of    }
  877. {    the specified file or directory's finder information.                    }
  878. {                                                                            }
  879. {    vRefNum    input:    Volume specification.                                    }
  880. {    dirID    input:    Directory ID.                                            }
  881. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  882. {                    a directory that's the object.                            }
  883.  
  884.  
  885. {***************************************************************************}
  886.  
  887.  
  888.     FUNCTION FSpClearIsInvisible ({CONST}
  889.                                     VAR spec: FSSpec): OSErr;
  890. {    Use FSpClearIsInvisible to clear the invisible bit in the fdFlags word    }
  891. {    of the specified file or directory's finder information.                }
  892. {                                                                            }
  893. {    spec    input:    An FSSpec record specifying the object.                    }
  894.  
  895.  
  896. {***************************************************************************}
  897.  
  898.  
  899.     FUNCTION SetNameLocked (vRefNum: Integer;
  900.                                     dirID: LongInt;
  901.                                     name: StringPtr): OSErr;
  902. {    Use SetNameLocked to set the nameLocked bit in the fdFlags word of the    }
  903. {    specified file or directory's finder information.                        }
  904. {                                                                            }
  905. {    vRefNum    input:    Volume specification.                                    }
  906. {    dirID    input:    Directory ID.                                            }
  907. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  908. {                    a directory that's the object.                            }
  909.  
  910.  
  911. {***************************************************************************}
  912.  
  913.  
  914.     FUNCTION FSpSetNameLocked ({CONST}
  915.                                     VAR spec: FSSpec): OSErr;
  916. {    Use FSpSetNameLocked to set the nameLocked bit in the fdFlags word of    }
  917. {    the specified file or directory's finder information.                    }
  918. {                                                                            }
  919. {    spec    input:    An FSSpec record specifying the object.                    }
  920.  
  921.  
  922. {***************************************************************************}
  923.  
  924.  
  925.     FUNCTION ClearNameLocked (vRefNum: Integer;
  926.                                     dirID: LongInt;
  927.                                     name: StringPtr): OSErr;
  928. {    Use ClearNameLocked to clear the nameLocked bit in the fdFlags word of    }
  929. {    the specified file or directory's finder information.                    }
  930. {                                                                            }
  931. {    vRefNum    input:    Volume specification.                                    }
  932. {    dirID    input:    Directory ID.                                            }
  933. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  934. {                    a directory that's the object.                            }
  935.  
  936.  
  937. {***************************************************************************}
  938.  
  939.  
  940.     FUNCTION FSpClearNameLocked ({CONST}
  941.                                     VAR spec: FSSpec): OSErr;
  942. {    Use FSpClearNameLocked to clear the nameLocked bit in the fdFlags word    }
  943. {    of the specified file or directory's finder information.                }
  944. {                                                                            }
  945. {    spec    input:    An FSSpec record specifying the object.                    }
  946.  
  947.  
  948. {***************************************************************************}
  949.  
  950.  
  951.     FUNCTION SetIsStationery (vRefNum: Integer;
  952.                                     dirID: LongInt;
  953.                                     name: Str255): OSErr;
  954. {    Use SetIsStationery to set the isStationery bit in the fdFlags word        }
  955. {    of the specified file or directory's finder information.                }
  956. {                                                                            }
  957. {    vRefNum    input:    Volume specification.                                    }
  958. {    dirID    input:    Directory ID.                                            }
  959. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  960. {                    a directory that's the object.                            }
  961.  
  962.  
  963. {***************************************************************************}
  964.  
  965.  
  966.     FUNCTION FSpSetIsStationery ({CONST}
  967.                                     VAR spec: FSSpec): OSErr;
  968. {    Use FSpSetIsStationery to set the isStationery bit in the fdFlags        }
  969. {    word of the specified file or directory's finder information.            }
  970. {                                                                            }
  971. {    spec    input:    An FSSpec record specifying the object.                    }
  972.  
  973.  
  974. {***************************************************************************}
  975.  
  976.  
  977.     FUNCTION ClearIsStationery (vRefNum: Integer;
  978.                                     dirID: LongInt;
  979.                                     name: Str255): OSErr;
  980. {    Use ClearIsStationery to clear the isStationery bit in the fdFlags        }
  981. {    word of the specified file or directory's finder information.            }
  982. {                                                                            }
  983. {    vRefNum    input:    Volume specification.                                    }
  984. {    dirID    input:    Directory ID.                                            }
  985. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  986. {                    a directory that's the object.                            }
  987.  
  988.  
  989. {***************************************************************************}
  990.  
  991.  
  992.     FUNCTION FSpClearIsStationery ({CONST}
  993.                                     VAR spec: FSSpec): OSErr;
  994. {    Use FSpClearIsStationery to clear the isStationery bit in the fdFlags    }
  995. {    word of the specified file or directory's finder information.            }
  996. {                                                                            }
  997. {    spec    input:    An FSSpec record specifying the object.                    }
  998.  
  999.  
  1000. {***************************************************************************}
  1001.  
  1002.  
  1003.     FUNCTION SetHasCustomIcon (vRefNum: Integer;
  1004.                                     dirID: LongInt;
  1005.                                     name: StringPtr): OSErr;
  1006. {    Use SetHasCustomIcon to set the hasCustomIcon bit in the fdFlags word    }
  1007. {    of the specified file or directory's finder information.                }
  1008. {                                                                            }
  1009. {    vRefNum    input:    Volume specification.                                    }
  1010. {    dirID    input:    Directory ID.                                            }
  1011. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  1012. {                    a directory that's the object.                            }
  1013.  
  1014.  
  1015. {***************************************************************************}
  1016.  
  1017.  
  1018.     FUNCTION FSpSetHasCustomIcon ({CONST}
  1019.                                     VAR spec: FSSpec): OSErr;
  1020. {    Use FSpSetHasCustomIcon to set the hasCustomIcon bit in the fdFlags        }
  1021. {    word of the specified file or directory's finder information.            }
  1022. {                                                                            }
  1023. {    spec    input:    An FSSpec record specifying the object.                    }
  1024.  
  1025.  
  1026. {***************************************************************************}
  1027.  
  1028.  
  1029.     FUNCTION ClearHasCustomIcon (vRefNum: Integer;
  1030.                                     dirID: LongInt;
  1031.                                     name: StringPtr): OSErr;
  1032. {    Use ClearHasCustomIcon to clear the hasCustomIcon bit in the fdFlags    }
  1033. {    word of the specified file or directory's finder information.            }
  1034. {                                                                            }
  1035. {    vRefNum    input:    Volume specification.                                    }
  1036. {    dirID    input:    Directory ID.                                            }
  1037. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  1038. {                    a directory that's the object.                            }
  1039.  
  1040.  
  1041. {***************************************************************************}
  1042.  
  1043.  
  1044.     FUNCTION FSpClearHasCustomIcon ({CONST}
  1045.                                     VAR spec: FSSpec): OSErr;
  1046. {    Use FSpClearHasCustomIcon to clear the hasCustomIcon bit in the fdFlags    }
  1047. {    word of the specified file or directory's finder information.            }
  1048. {                                                                            }
  1049. {    spec    input:    An FSSpec record specifying the object.                    }
  1050.  
  1051.  
  1052. {***************************************************************************}
  1053.  
  1054.  
  1055.     FUNCTION ClearHasBeenInited (vRefNum: Integer;
  1056.                                     dirID: LongInt;
  1057.                                     name: StringPtr): OSErr;
  1058. {    Use ClearHasBeenInited to clear the hasBeenInited bit in the fdFlags    }
  1059. {    word of the specified file or directory's finder information.            }
  1060. {                                                                            }
  1061. {    vRefNum    input:    Volume specification.                                    }
  1062. {    dirID    input:    Directory ID.                                            }
  1063. {    name    input:    Pointer to object name, or nil when dirID specifies        }
  1064. {                    a directory that's the object.                            }
  1065.  
  1066.  
  1067. {***************************************************************************}
  1068.  
  1069.     FUNCTION FSpClearHasBeenInited ({CONST}
  1070.                                     VAR spec: FSSpec): OSErr;
  1071. {    Use FSpClearHasBeenInited to clear the hasBeenInited bit in the fdFlags    }
  1072. {    word of the specified file or directory's finder information.            }
  1073. {                                                                            }
  1074. {    spec    input:    An FSSpec record specifying the object.                    }
  1075.  
  1076.  
  1077. {***************************************************************************}
  1078.  
  1079.  
  1080.     FUNCTION CopyFileMgrAttributes (srcVRefNum: Integer;
  1081.                                     srcDirID: LongInt;
  1082.                                     srcName: StringPtr;
  1083.                                     dstVRefNum: Integer;
  1084.                                     dstDirID: LongInt;
  1085.                                     dstName: StringPtr;
  1086.                                     copyLockBit: Boolean): OSErr;
  1087. {    Use CopyFileMgrAttributes to copy all File Manager attributes from the    }
  1088. {    source file or directory to the destination file or directory.            }
  1089. {    If copyLockBit is true, then set the locked state of the destination    }
  1090. {    to match the source.                                                    }
  1091. {                                                                            }
  1092. {    srcVRefNum    input:    Source volume specification.                        }
  1093. {    srcDirID    input:    Source directory ID.                                }
  1094. {    srcName        input:    Pointer to source object name, or nil when            }
  1095. {                        srcDirID specifies a directory that's the object.    }
  1096. {    dstVRefNum    input:    Destination volume specification.                    }
  1097. {    dstDirID    input:    Destination directory ID.                            }
  1098. {    dstName        input:    Pointer to destination object name, or nil when        }
  1099. {                        dstDirID specifies a directory that's the object.    }
  1100. {    copyLockBit    input:    If true, set the locked state of the destination    }
  1101. {                        to match the source.                                }
  1102.  
  1103.  
  1104. {***************************************************************************}
  1105.  
  1106.  
  1107.     FUNCTION FSpCopyFileMgrAttributes ({CONST}
  1108.                                     VAR srcSpec: FSSpec;
  1109.                                     {CONST}
  1110.                                     VAR dstSpec: FSSpec;
  1111.                                     copyLockBit: Boolean): OSErr;
  1112. {    Use FSpCopyFileMgrAttributes to copy all File Manager attributes from    }
  1113. {    the source file or directory to the destination file or directory.        }
  1114. {    If copyLockBit is true, then set the locked state of the destination    }
  1115. {    to match the source.                                                    }
  1116. {                                                                            }
  1117. {    srcSpec        input:    An FSSpec record specifying the source object.        }
  1118. {    dstSpec        input:    An FSSpec record specifying the destination object.    }
  1119. {    copyLockBit    input:    If true, set the locked state of the destination    }
  1120. {                        to match the source.                                }
  1121.  
  1122.  
  1123. {***************************************************************************}
  1124.  
  1125.  
  1126.     FUNCTION HOpenAware (vRefNum: Integer;
  1127.                                     dirID: LongInt;
  1128.                                     fileName: Str255;
  1129.                                     denyModes: Integer;
  1130.                                     VAR refNum: Integer): OSErr;
  1131. {    Use HOpenAware to open the data fork of a file using deny mode            }
  1132. {    permissions instead the normal File Manager permissions.  If OpenDeny    }
  1133. {    is not available, then HOpenAware translates the deny modes to the        }
  1134. {    closest File Manager permissions and tries to open the file with        }
  1135. {    OpenDF first, and then Open if OpenDF isn't available. By using            }
  1136. {    HOpenAware with deny mode permissions, a program can be "AppleShare        }
  1137. {    aware" and fall back on the standard File Manager open calls            }
  1138. {    automatically.                                                            }
  1139. {                                                                            }
  1140. {    vRefNum        input:    Volume specification.                                }
  1141. {    dirID        input:    Directory ID.                                        }
  1142. {    fileName    input:    The name of the file.                                }
  1143. {    denyModes    input:    The deny modes access under which to open the file.    }
  1144. {    refNum        output:    The file reference number of the opened file.        }
  1145.  
  1146.  
  1147. {***************************************************************************}
  1148.  
  1149.  
  1150.     FUNCTION FSpOpenAware ({CONST}
  1151.                                     VAR spec: FSSpec;
  1152.                                     denyModes: Integer;
  1153.                                     VAR refNum: Integer): OSErr;
  1154. {    Use FSpOpenAware to open the data fork of a file using deny mode        }
  1155. {    permissions instead the normal File Manager permissions.  If OpenDeny    }
  1156. {    is not available, then FSpOpenAware translates the deny modes to the    }
  1157. {    closest File Manager permissions and tries to open the file with        }
  1158. {    OpenDF first, and then Open if OpenDF isn't available. By using            }
  1159. {    FSpOpenAware with deny mode permissions, a program can be "AppleShare    }
  1160. {    aware" and fall back on the standard File Manager open calls            }
  1161. {    automatically.                                                            }
  1162. {                                                                            }
  1163. {    spec        input:    An FSSpec record specifying the file.                }
  1164. {    denyModes    input:    The deny modes access under which to open the file.    }
  1165. {    refNum        output:    The file reference number of the opened file.        }
  1166.  
  1167.  
  1168. {***************************************************************************}
  1169.  
  1170.  
  1171.     FUNCTION HOpenRFAware (vRefNum: Integer;
  1172.                                     dirID: LongInt;
  1173.                                     fileName: Str255;
  1174.                                     denyModes: Integer;
  1175.                                     VAR refNum: Integer): OSErr;
  1176. {    Use HOpenRFAware to open the resource fork of a file using deny mode    }
  1177. {    permissions instead the normal File Manager permissions.  If OpenRFDeny    }
  1178. {    is not available, then HOpenRFAware translates the deny modes to the    }
  1179. {    closest File Manager permissions and tries to open the file with        }
  1180. {    OpenRF. By using HOpenRFAware with deny mode permissions, a program        }
  1181. {    can be "AppleShare aware" and fall back on the standard File Manager    }
  1182. {    open calls automatically.                                                }
  1183. {                                                                            }
  1184. {    vRefNum        input:    Volume specification.                                }
  1185. {    dirID        input:    Directory ID.                                        }
  1186. {    fileName    input:    The name of the file.                                }
  1187. {    denyModes    input:    The deny modes access under which to open the file.    }
  1188. {    refNum        output:    The file reference number of the opened file.        }
  1189.  
  1190.  
  1191. {***************************************************************************}
  1192.  
  1193.  
  1194.     FUNCTION FSpOpenRFAware ({CONST}
  1195.                                     VAR spec: FSSpec;
  1196.                                     denyModes: Integer;
  1197.                                     VAR refNum: Integer): OSErr;
  1198. {    Use FSpOpenRFAware to open the resource fork of a file using deny mode    }
  1199. {    permissions instead the normal File Manager permissions.  If OpenRFDeny    }
  1200. {    is not available, then FSpOpenRFAware translates the deny modes to the    }
  1201. {    closest File Manager permissions and tries to open the file with        }
  1202. {    OpenRF. By using FSpOpenRFAware with deny mode permissions, a program    }
  1203. {    can be "AppleShare aware" and fall back on the standard File Manager    }
  1204. {    open calls automatically.                                                }
  1205. {                                                                            }
  1206. {    spec        input:    An FSSpec record specifying the file.                }
  1207. {    denyModes    input:    The deny modes access under which to open the file.    }
  1208. {    refNum        output:    The file reference number of the opened file.        }
  1209.  
  1210.  
  1211. {***************************************************************************}
  1212.  
  1213.  
  1214.     FUNCTION FSReadNoCache (refNum: Integer;
  1215.                                     VAR count: LongInt;
  1216.                                     buffPtr: Ptr): OSErr;
  1217. {    Use FSReadNoCache to read any number of bytes from an open file while    }
  1218. {    asking the file system to bypass its cache mechanism.                    }
  1219. {                                                                            }
  1220. {    refNum    input:    The file reference number of an open file.                }
  1221. {    count    input:    The number of bytes to read.                            }
  1222. {            output:    The number of bytes actually read.                        }
  1223. {    buffPtr    input:    A pointer to the data buffer into which the bytes are    }
  1224. {                    to be read.                                                }
  1225.  
  1226.  
  1227. {***************************************************************************}
  1228.  
  1229.  
  1230.     FUNCTION FSWriteNoCache (refNum: Integer;
  1231.                                     VAR count: LongInt;
  1232.                                     buffPtr: Ptr): OSErr;
  1233. {    Use FSReadNoCache to write any number of bytes to an open file while    }
  1234. {    asking the file system to bypass its cache mechanism.                    }
  1235. {                                                                            }
  1236. {    refNum    input:    The file reference number of an open file.                }
  1237. {    count    input:    The number of bytes to write to the file.                }
  1238. {            output:    The number of bytes actually written.                    }
  1239. {    buffPtr    input:    A pointer to the data buffer from which the bytes are    }
  1240. {                    to be written.                                            }
  1241.  
  1242.  
  1243. {***************************************************************************}
  1244.  
  1245.  
  1246.     FUNCTION FSWriteVerify (refNum: Integer;
  1247.                                     VAR count: LongInt;
  1248.                                     buffPtr: Ptr): OSErr;
  1249. {    Write any number of bytes to an open file and then verify the data was    }
  1250. {    written.                                                                }
  1251. {    The FSWriteVerify function writes any number of bytes to an open file    }
  1252. {    and then verifies that the data was actually written to the device.        }
  1253. {                                                                            }
  1254. {    refNum    input:    The file reference number of an open file.                }
  1255. {    count    input:    The number of bytes to write to the file.                }
  1256. {            output:    The number of bytes actually written.                    }
  1257. {    buffPtr    input:    A pointer to the data buffer from which the bytes are    }
  1258. {                    to be written.                                            }
  1259.  
  1260.  
  1261. {***************************************************************************}
  1262.  
  1263.  
  1264.     FUNCTION CopyFork (srcRefNum: Integer;
  1265.                                     dstRefNum: Integer;
  1266.                                     copyBufferPtr: Ptr;
  1267.                                     copyBufferSize: LongInt): OSErr;
  1268. {    Use CopyFork to copy all data from the source fork to the destination    }
  1269. {    fork of open file forks and makes sure the destination EOF is equal        }
  1270. {    to the source EOF.                                                        }
  1271. {                                                                            }
  1272. {    srcRefNum        input:    The source file reference number.                }
  1273. {    dstRefNum        input:    The destination file reference number.            }
  1274. {    copyBufferPtr    input:    Pointer to buffer to use during copy. The        }
  1275. {                            buffer should be at least 512-bytes minimum.    }
  1276. {                            The larger the buffer, the faster the copy.        }
  1277. {    copyBufferSize    input:    The size of the copy buffer.                    }
  1278.  
  1279.  
  1280. {***************************************************************************}
  1281.  
  1282.  
  1283.     FUNCTION GetFileLocation (refNum: Integer;
  1284.                                     VAR vRefNum: Integer;
  1285.                                     VAR dirID: LongInt;
  1286.                                     fileName: StringPtr): OSErr;
  1287. {    Use GetFileLocation to get the location (volume reference number,        }
  1288. {    directory ID, and fileName) of an open file.                            }
  1289. {                                                                            }
  1290. {    refNum        input:    The file reference number of an open file.            }
  1291. {    vRefNum        output:    The volume reference number.                        }
  1292. {    dirID        output:    The parent directory ID.                            }
  1293. {    fileName    input:    Points to a buffer (minimum Str63) where the        }
  1294. {                        filename is to be returned or must be nil.            }
  1295. {                output:    The filename.                                        }
  1296.  
  1297.  
  1298. {***************************************************************************}
  1299.  
  1300.  
  1301.     FUNCTION FSpGetFileLocation (refNum: Integer;
  1302.                                     VAR spec: FSSpec): OSErr;
  1303. {    Use FSpGetFileLocation to get the location of an open file in an        }
  1304. {    FSSpec record.                                                            }
  1305. {                                                                            }
  1306. {    refNum        input:    The file reference number of an open file.            }
  1307. {    spec        output:    FSSpec record containing the file name and location.}
  1308.  
  1309.  
  1310. {***************************************************************************}
  1311.  
  1312.  
  1313.     FUNCTION CopyDirectoryAccess (srcVRefNum: Integer;
  1314.                                     srcDirID: LongInt;
  1315.                                     srcName: StringPtr;
  1316.                                     dstVRefNum: Integer;
  1317.                                     dstDirID: LongInt;
  1318.                                     dstName: StringPtr): OSErr;
  1319. {    Use CopyDirectoryAccess to copy the AFP directory access privileges        }
  1320. {    from one directory to another. Both directories must be on the same        }
  1321. {    file server, but not necessarily on the same server volume.                }
  1322. {                                                                            }
  1323. {    srcVRefNum    input:    Source volume specification.                        }
  1324. {    srcDirID    input:    Source directory ID.                                }
  1325. {    srcName        input:    Pointer to source directory name, or nil when        }
  1326. {                        srcDirID specifies the directory.                    }
  1327. {    dstVRefNum    input:    Destination volume specification.                    }
  1328. {    dstDirID    input:    Destination directory ID.                            }
  1329. {    dstName        input:    Pointer to destination directory name, or nil when    }
  1330. {                        dstDirID specifies the directory.                    }
  1331.  
  1332.  
  1333. {***************************************************************************}
  1334.  
  1335.  
  1336.     FUNCTION FSpCopyDirectoryAccess ({CONST}
  1337.                                     VAR srcSpec: FSSpec;
  1338.                                     {CONST}
  1339.                                     VAR dstSpec: FSSpec): OSErr;
  1340. {    Use FSpCopyDirectoryAccess to copy the AFP directory access privileges    }
  1341. {    from one directory to another. Both directories must be on the same        }
  1342. {    file server, but not necessarily on the same server volume.                }
  1343. {                                                                            }
  1344. {    srcSpec        input:    An FSSpec record specifying the source directory.    }
  1345. {    dstSpec        input:    An FSSpec record specifying the destination            }
  1346. {                        directory.                                            }
  1347.  
  1348.  
  1349. {***************************************************************************}
  1350.  
  1351.  
  1352.     FUNCTION HMoveRenameCompat (vRefNum: Integer;
  1353.                                     srcDirID: LongInt;
  1354.                                     srcName: Str255;
  1355.                                     dstDirID: LongInt;
  1356.                                     dstpathName: StringPtr;
  1357.                                     copyName: StringPtr): OSErr;
  1358. {    Use HMoveRenameCompat to move a file or directory and optionally to        }
  1359. {    rename it.  The source and destination locations must be on the same    }
  1360. {    volume. This routine works even if the volume doesn't support            }
  1361. {    MoveRename.                                                                }
  1362. {                                                                            }
  1363. {    vRefNum        input:    Volume specification.                                }
  1364. {    srcDirID    input:    Source directory ID.                                }
  1365. {    srcName        input:    The source object name.                                }
  1366. {    dstDirID    input:    Destination directory ID.                            }
  1367. {    dstName        input:    Pointer to destination directory name, or            }
  1368. {                        nil when dstDirID specifies a directory.            }
  1369. {    copyName    input:    Points to the new name if the object is to be        }
  1370. {                        renamed or nil if the object isn't to be renamed.    }
  1371.  
  1372.  
  1373.  
  1374. {***************************************************************************}
  1375.  
  1376.  
  1377.     FUNCTION FSpMoveRenameCompat ({CONST}
  1378.                                     VAR srcSpec: FSSpec;
  1379.                                     {CONST}
  1380.                                     VAR dstSpec: FSSpec;
  1381.                                     copyName: StringPtr): OSErr;
  1382. {    Use FSpMoveRenameCompat to move a file or directory and optionally to    }
  1383. {    rename it. The source and destination locations must be on the same        }
  1384. {    volume. This routine works even if the volume doesn't support            }
  1385. {    MoveRename.                                                                }
  1386. {                                                                            }
  1387. {    srcSpec        input:    An FSSpec record specifying the source object.        }
  1388. {    dstSpec        input:    An FSSpec record specifying the destination            }
  1389. {                        directory.                                            }
  1390. {    copyName    input:    Points to the new name if the object is to be        }
  1391. {                        renamed or nil if the object isn't to be renamed.    }
  1392.  
  1393.  
  1394. {***************************************************************************}
  1395.  
  1396.  
  1397.     FUNCTION BuildAFPVolMountInfo (theFlags: Integer;
  1398.                                     theNBPInterval: SignedByte;
  1399.                                     theNBPCount: SignedByte;
  1400.                                     theUAMType: Integer;
  1401.                                     theZoneName: Str31;
  1402.                                     theServerName: Str31;
  1403.                                     theVolName: Str27;
  1404.                                     theUserName: Str31;
  1405.                                     theUserPassWord: Str8;
  1406.                                     theVolPassWord: Str8;
  1407.                                     theAFPInfo: MyAFPVolMountInfoPtr): OSErr;
  1408. {    Use BuildAFPVolMountInfo to initialize the fields of an AFPVolMountInfo    }
  1409. {    record before using that record to call the VolumeMount function.        }
  1410. {                                                                            }
  1411. {    theFlags        input:    The AFP mounting flags. 0 = normal mount;        }
  1412. {                            set bit 0 to inhibit greeting messages.            }
  1413. {    theNBPInterval    input:    The interval used for VolumeMount's                }
  1414. {                            NBP Lookup call. 7 is a good choice.            }
  1415. {    theNBPCount        input:    The retry count used for VolumeMount's            }
  1416. {                            NBP Lookup call. 5 is a good choice.            }
  1417. {    theUAMType        input:    The user authentication method to use.            }
  1418. {    theZoneName        input:    The AppleTalk zone name of the server.            }
  1419. {    theServerName    input:    The AFP server name.                            }
  1420. {    theVolName        input:    The AFP volume name.                            }
  1421. {    theUserName        input:    The user name (zero length Pascal string for    }
  1422. {                            guest).                                            }
  1423. {    theUserPassWord    input:    The user password (zero length Pascal string    }
  1424. {                            if no user password)                            }
  1425. {    theVolPassWord    input:    The volume password (zero length Pascal string    }
  1426. {                            if no volume password)                            }
  1427. {    theAFPInfo        input:    Pointer to AFPVolMountInfo record to            }
  1428. {                            initialize.                                        }
  1429.  
  1430.  
  1431. {***************************************************************************}
  1432.  
  1433.  
  1434.     FUNCTION RetrieveAFPVolMountInfo (theAFPInfo: AFPVolMountInfoPtr;
  1435.                                     VAR theFlags: Integer;
  1436.                                     VAR theUAMType: Integer;
  1437.                                     theZoneName: StringPtr;
  1438.                                     theServerName: StringPtr;
  1439.                                     theVolName: StringPtr;
  1440.                                     theUserName: StringPtr): OSErr;
  1441. {    Use RetrieveAFPVolMountInfo to retrieve the AFP mounting information    }
  1442. {    returned in an AFPVolMountInfo by the GetVolMountInfo function.            }
  1443. {                                                                            }
  1444. {    theAFPInfo        input:    Pointer to AFPVolMountInfo record that contains    }
  1445. {                            the AFP mounting information.                    }
  1446. {    theFlags        output:    The AFP mounting flags. 0 = normal mount;        }
  1447. {                            if bit 0 is set, greeting meesages were            }
  1448. {                            inhibited.                                        }
  1449. {    theUAMType        output:    The user authentication method used.            }
  1450. {    theZoneName        output:    The AppleTalk zone name of the server.            }
  1451. {    theServerName    output:    The AFP server name.                            }
  1452. {    theVolName        output:    The AFP volume name.                            }
  1453. {    theUserName        output:    The user name (zero length Pascal string for    }
  1454. {                            guest).                                            }
  1455.  
  1456.  
  1457. {***************************************************************************}
  1458.  
  1459.  
  1460.     FUNCTION GetUGEntries (objType: Integer;
  1461.                                     entries: UGEntryPtr;
  1462.                                     reqEntryCount: LongInt;
  1463.                                     VAR actEntryCount: LongInt;
  1464.                                     VAR objID: LongInt): OSErr;
  1465. {    Use GetUGEntries to build a list of user or group entries from the        }
  1466. {    local file server.                                                        }
  1467. {                                                                            }
  1468. {    objType            input:    The object type: -1 = group; 0 = user            }
  1469. {    UGEntries        input:    Pointer to array of UGEntry records where the    }
  1470. {                            list is returned.                                }
  1471. {    reqEntryCount    input:    The number of elements in the UGEntries array.    }
  1472. {    actEntryCount    output:    The number of entries returned.                    }
  1473. {    objID            input:    The current index position. Set to 0 to start    }
  1474. {                            with the first entry.                            }
  1475. {                    output:    The index position to get the next entry. Pass    }
  1476. {                            this value the next time you call GetUGEntries    }
  1477. {                            to start where you left off.                    }
  1478.  
  1479.  
  1480. {***************************************************************************}
  1481.  
  1482.  
  1483. IMPLEMENTATION
  1484.  
  1485. {    Functions to get information out of GetVolParmsInfoBuffer.                }
  1486.  
  1487.  
  1488.     FUNCTION isNetworkVolume (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1489.     BEGIN
  1490.         isNetworkVolume := (volParms.vMServerAdr <> 0);
  1491.     END;
  1492.  
  1493.     FUNCTION hasLimitFCBs (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1494.     BEGIN
  1495.         hasLimitFCBs := BTST(volParms.vMAttrib, bLimitFCBs);
  1496.     END;
  1497.  
  1498.     FUNCTION hasLocalWList (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1499.     BEGIN
  1500.         hasLocalWList := BTST(volParms.vMAttrib, bLocalWList);
  1501.     END;
  1502.  
  1503.     FUNCTION hasNoMiniFndr (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1504.     BEGIN
  1505.         hasNoMiniFndr := BTST(volParms.vMAttrib, bNoMiniFndr);
  1506.     END;
  1507.  
  1508.     FUNCTION hasNoVNEdit (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1509.     BEGIN
  1510.         hasNoVNEdit := BTST(volParms.vMAttrib, bNoVNEdit);
  1511.     END;
  1512.  
  1513.     FUNCTION hasNoLclSync (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1514.     BEGIN
  1515.         hasNoLclSync := BTST(volParms.vMAttrib, bNoLclSync);
  1516.     END;
  1517.  
  1518.     FUNCTION hasTrshOffLine (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1519.     BEGIN
  1520.         hasTrshOffLine := BTST(volParms.vMAttrib, bTrshOffLine);
  1521.     END;
  1522.  
  1523.     FUNCTION hasNoSwitchTo (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1524.     BEGIN
  1525.         hasNoSwitchTo := BTST(volParms.vMAttrib, bNoSwitchTo);
  1526.     END;
  1527.  
  1528.     FUNCTION hasNoDeskItems (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1529.     BEGIN
  1530.         hasNoDeskItems := BTST(volParms.vMAttrib, bNoDeskItems);
  1531.     END;
  1532.  
  1533.     FUNCTION hasNoBootBlks (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1534.     BEGIN
  1535.         hasNoBootBlks := BTST(volParms.vMAttrib, bNoBootBlks);
  1536.     END;
  1537.  
  1538.     FUNCTION hasAccessCntl (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1539.     BEGIN
  1540.         hasAccessCntl := BTST(volParms.vMAttrib, bAccessCntl);
  1541.     END;
  1542.  
  1543.     FUNCTION hasNoSysDir (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1544.     BEGIN
  1545.         hasNoSysDir := BTST(volParms.vMAttrib, bNoSysDir);
  1546.     END;
  1547.  
  1548.     FUNCTION hasExtFSVol (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1549.     BEGIN
  1550.         hasExtFSVol := BTST(volParms.vMAttrib, bHasExtFSVol);
  1551.     END;
  1552.  
  1553.     FUNCTION hasOpenDeny (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1554.     BEGIN
  1555.         hasOpenDeny := BTST(volParms.vMAttrib, bHasOpenDeny);
  1556.     END;
  1557.  
  1558.     FUNCTION hasCopyFile (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1559.     BEGIN
  1560.         hasCopyFile := BTST(volParms.vMAttrib, bHasCopyFile);
  1561.     END;
  1562.  
  1563.     FUNCTION hasMoveRename (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1564.     BEGIN
  1565.         hasMoveRename := BTST(volParms.vMAttrib, bHasMoveRename);
  1566.     END;
  1567.  
  1568.     FUNCTION hasDesktopMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1569.     BEGIN
  1570.         hasDesktopMgr := BTST(volParms.vMAttrib, bHasDesktopMgr);
  1571.     END;
  1572.  
  1573.     FUNCTION hasShortName (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1574.     BEGIN
  1575.         hasShortName := BTST(volParms.vMAttrib, bHasShortName);
  1576.     END;
  1577.  
  1578.     FUNCTION hasFolderLock (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1579.     BEGIN
  1580.         hasFolderLock := BTST(volParms.vMAttrib, bHasFolderLock);
  1581.     END;
  1582.  
  1583.     FUNCTION hasPersonalAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1584.     BEGIN
  1585.         hasPersonalAccessPrivileges := BTST(volParms.vMAttrib, bHasPersonalAccessPrivileges);
  1586.     END;
  1587.  
  1588.     FUNCTION hasUserGroupList (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1589.     BEGIN
  1590.         hasUserGroupList := BTST(volParms.vMAttrib, bHasUserGroupList);
  1591.     END;
  1592.  
  1593.     FUNCTION hasCatSearch (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1594.     BEGIN
  1595.         hasCatSearch := BTST(volParms.vMAttrib, bHasCatSearch);
  1596.     END;
  1597.  
  1598.     FUNCTION hasFileIDs (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1599.     BEGIN
  1600.         hasFileIDs := BTST(volParms.vMAttrib, bHasFileIDs);
  1601.     END;
  1602.  
  1603.     FUNCTION hasBTreeMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1604.     BEGIN
  1605.         hasBTreeMgr := BTST(volParms.vMAttrib, bHasBTreeMgr);
  1606.     END;
  1607.  
  1608.     FUNCTION hasBlankAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;
  1609.     BEGIN
  1610.         hasBlankAccessPrivileges := BTST(volParms.vMAttrib, bHasBlankAccessPrivileges);
  1611.     END;
  1612.  
  1613. END.